home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bipl.zip / DATA.ZIP / PT6.GMR < prev    next >
Text File  |  1992-09-20  |  724b  |  24 lines

  1. program -> PROGRAM ID ; declarations compound_stmt .
  2. declarations -> declarations VAR id_list : INTEGER ;
  3. declarations -> EPSILON
  4. id_list -> ID
  5. id_list -> id_list , ID
  6. compound_stmt -> BEGIN optional_stmts END
  7. optional_stmts -> stmt_list
  8. optional_stmts -> EPSILON
  9. stmt_list -> stmt
  10. stmt_list -> stmt_list ; stmt
  11. stmt -> ID := simple_expression
  12. stmt -> compound_stmt
  13. stmt -> IF expression THEN stmt ELSE stmt
  14. stmt -> IF expression THEN stmt 
  15. expression -> simple_expression
  16. expression -> simple_expression RELOP simple_expression
  17. simple_expression -> term
  18. simple_expression -> simple_expression ADDOP term
  19. term -> factor
  20. term -> term MULOP factor
  21. factor -> ID
  22. factor -> INTCON
  23. factor -> ( expression )
  24.